package com.zhuhai.repository;

import com.zhuhai.entity.TicketInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Date;
import java.util.List;

/**
 * @author zhuhai
 */
public interface TicketInfoReposity extends JpaRepository<TicketInfo, Integer>, JpaSpecificationExecutor<TicketInfo> {
    /**
     * 查询创建时间内的票据信息
     * @param start
     * @param page
     * @return
     */
    List<TicketInfo> findByCreateTimeLessThanEqual(final Date start, final Pageable page);

    /**
     * 获取票据为空的数据
     * @return
     */
    List<TicketInfo> findByPriceIsNull();
}
